package com.jinsi.controller.yrf;
import com.jinsi.service.yrf.FeedbackStatisticsService;
import com.jinsi.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
 * @author: 86185
 * @description: 反馈统计
 * @date 2022/9/4
 */
@RestController
@RequestMapping("/feedbackStatisticsController")
public class FeedbackStatisticsController {

    @Autowired
    private FeedbackStatisticsService feedbackStatisticsService;

    /**
     * 获取统计图数据
     * @return 状态数据
     */
    @RequestMapping("/getAll")
    public R getAll(){
        Map<String,Object> map = new HashMap<>();
        ArrayList<Integer> all1 = feedbackStatisticsService.getAll("视频反馈");
        ArrayList<Integer> all2 = feedbackStatisticsService.getAll("商品反馈");
        ArrayList<Integer> all3 = feedbackStatisticsService.getAll("其他反馈");


        map.put("msg","成功");
        map.put("see1",all1);
        map.put("see2",all2);
        map.put("see3",all3);

        return R.ok(map);

    }



}
